<%--
  Created by IntelliJ IDEA.
  User: 甲乙饼叮叮
  Date: 2019/10/4
  Time: 15:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>个人中心</title>
    <link rel="Shortcut Icon" href="../imgs/Kat-icon.png">
    <link rel="stylesheet" href="../plugins/bootstrap/css/bootstrap.css" type="text/css">
    <link type="text/css" href="../css/personal.css" rel="stylesheet" />
    <link rel="stylesheet" href="../css/head.css">

</head>

<body>
<!-- 导航开始 -->
<%@ include file="../../nav/nav.jsp"%>
<!-- 导航结束 -->
<!-- 个人中心视图 -->
<a name="per"></a>
<div class="personal">
    <div class="container">
        <div class="row">
            <div class="col-xs-2 col-sm-2 col-md-2" id="left">
                <div class="title">
                    <span>个人中心</span>
                </div>
                <div id="outer">
                    <!-- <div class="container-fluid"> -->
                    <ul id="tab" class="nav navbar-nav">
                        <li><a href="${pageContext.request.contextPath}/personal/user" class="glyphicon glyphicon-user">&nbsp;<span>我的信息</span></a>
                        </li>
                        <li><a href="${pageContext.request.contextPath}/personal/order"
                               class="glyphicon glyphicon-list-alt">&nbsp;<span>挂号订单</span></a></li>
                        <li><a href="${pageContext.request.contextPath}/personal/record"
                               class="glyphicon glyphicon-calendar"><span>&nbsp;就诊记录</span></a></li>
                        <li class="active"><span class="glyphicon glyphicon-tasks">&nbsp;我的病历</span>
                        </li>
                        <li><a href="${pageContext.request.contextPath}/personal/safetys" class="glyphicon glyphicon-phone">&nbsp;<span>账号安全</span></a>
                        </li>
                        <li><a href="${pageContext.request.contextPath}/personal/newview" class="glyphicon glyphicon-tree-deciduous">&nbsp;<span>就诊管理</span></a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="col-xs-9 col-sm-9 col-md-9" id="righter">
                <div class="title">
                    <span><img src="<%=request.getContextPath()%>/imgs/weblogo.png" alt="" style="width: 2%">知医治</span>

                </div>
                <div id="content">
                    <div style="display:block;" class="tabpage">
                        <h3 class="glyphicon glyphicon-grain">第一步:填写病历的名称</h3><br>
                        <div class="counts">
                            <form  action="<%=request.getContextPath()%>/personal/medup" method="post" onsubmit="return checkSub()">
                                <div class="texts" style="margin-left: 100px;">

                                    标题:&nbsp; <input type="text" id="user" name="iname" onblur="codeUser()" placeholder="例如:苏州大学附属医院">
                                    <br>
                                </div>
                                <div class="texts" style="margin-left: 150px;">
                                     <span id="userSpan" style="color:red"></span>
                                </div>
                                <div style="margin-left:160px;margin-top:100px;">
                                    <a href="<%=request.getContextPath()%>/personal/medical"><span><button type="button" style="color:white;"><small>取消上传</small></button></span></a>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <span><button type="submit" style="color:white;"><small>下一步>></small></button></span>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<%@ include file="../../nav/foot.jsp"%>
<script>
    function checkSub(){
        codeUser();
        return codeUser();
    }
    function codeUser(){
        return codedata("user",/^.{5,10}$/)
    }
    //封装
    function codedata(a,reg1){
        //获取用户的用户信息
        var user = document.getElementById(a).value
        var span = document.getElementById(a+"Span")
        var alt = document.getElementById(a).alt
        //创建校验规则
        var reg=reg1;
        //校验
        if(user==""|| user==null){
            span.innerHTML=alt+"不能为空"
            return false
        }else if(reg.test(user)){
            span.innerHTML=alt+"ok"
            return true
        }else{
            span.innerHTML=alt+"不符合规则"
            return false
        }
    }
</script>
<!-- bootstrap中的js插件依赖于jquery框架,所以必须先引入jquery的js文件 -->
<script src="../plugins/jquery/jquery.min.js"></script>
<!--引入bootstrap的js文件-->
<script src="../plugins/bootstrap/js/bootstrap.js"></script>

</body>
</html>